import { defineStore } from "pinia";

// 存储目录展开信息
const SwtichStore = defineStore('swtich', {
    state: () => ({
        isOpen: false,
        theme: true,
        isLogo: true,
        isCompact: false,
        isTagsView: true,
        Layout: 0,
    }),
    actions: {
        async IsOpen(data) {
            this.isOpen = data;
        },
        async Theme(data) {
            this.theme = data;
        },
        async IsLogo(data) {
            this.isLogo = data;
        },
        async IsTagsView(data) {
            this.isTagsView = data;
        },
        async IsCompact(data) {
            this.isCompact = data;
        },
        async SelectLayout(data) {
            this.Layout = data;
        },
    },
    persist: true
})

export default SwtichStore;